﻿using Coldairarrow.Entity.MEGA;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.MEGA
{
    public interface IMEGA_XZQHBusiness
    {
        Task<PageResult<MEGA_XZQH>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<MEGA_XZQH> GetTheDataAsync(string id);
        Task AddDataAsync(MEGA_XZQH data);
        Task UpdateDataAsync(MEGA_XZQH data);
        Task DeleteDataAsync(List<string> ids);
        Task<List<Base_DepartmentTreeDTO>> GetOneTreeDataListAsync(DepartmentsTreeInputDTO input);
        Task<List<Base_DepartmentTreeDTO>> GetTwoTreeDataListAsync(DepartmentsTreeInputDTO input);
        Task<List<Base_DepartmentTreeDTO>> GetAllTreeDataListAsync(DepartmentsTreeInputDTO input);
        Task<List<Base_DepartmentTreeDTO>> GetThreeTreeDataListAsync(DepartmentsTreeInputDTO input);
        Task<object> ExportToExcelData();

        List<string> GetChildrenIds(string departmentId);
    }

    public class DepartmentsTreeInputDTO
    {
        public string parentId { get; set; }

        public string name { get; set; }
    }

    public class Base_DepartmentTreeDTO : TreeModelDTO
    {
        public string title { get => Text; }
        public string value { get; set; }
        public string key { get => Id; }

        public string label { get; set; }
        /// <summary>
        /// 部门名
        /// </summary>
        public String Name { get; set; }

        /// <summary>
        /// 行政编码
        /// </summary>
        public String Code { get; set; }


        /// <summary>
        /// 行政区划等级
        /// </summary>
        public int NewLevel { get; set; } = 16;


        /// <summary>
        /// bLng
        /// </summary>
        public string Lng { get; set; } = "0.0000000000";

        /// <summary>
        /// bLat
        /// </summary>
        public string Lat { get; set; } = "0.0000000000";


        /// <summary>
        /// 行政区划边界点经纬度
        /// </summary>
        public String JsonData { get; set; }

    }
}